package com.sdjz.club.club.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.sdjz.club.club.entity.Event;
import com.sdjz.club.club.entity.UserEvent;
import com.sdjz.club.club.entity.UserOrganization;
import com.sdjz.club.club.mapper.EventMapper;
import com.sdjz.club.club.mapper.UserEventMapper;
import com.sdjz.club.club.service.EventService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author Dftre
 * @since 2022-07-21
 */
@Service
public class EventServiceImp extends ServiceImpl<EventMapper, Event> implements EventService {
    @Autowired
    UserEventMapper userEventMapper;

    public Boolean delete(String id){
        userEventMapper.delete(
                new QueryWrapper<UserEvent>()
                        .eq("event_id",id)
        );
        this.removeById(id);
      return true;
    };

}
